import request from '../request-axios.js';
import { API_CONFIG } from '../config.js';

// 视频数据管理API - 只提供添加视频数据记录功能
export const videoDataAPI = {
  // 添加视频数据记录
  addVideoData: (data) => {
    const params = {
      startCollectTime: data.startCollectTime,
      endCollectTime: data.endCollectTime,
      storagePath: data.storagePath,
      remark: data.remark || ''
    };

    console.log('视频数据API参数:', params);
    return request.post(API_CONFIG.ENDPOINTS.VIDEO_DATA_ADD, null, { params });
  },
  // 查询视频列表
  getVideoList: (params = {}) => {
    return request.get(API_CONFIG.ENDPOINTS.VIDEO_EDIT_LIST, null, { params });
  },
  // 视频剪辑
  cutVideoData: (params = {}) => {
    return request.get(API_CONFIG.ENDPOINTS.VIDEO_DATA_CUT, null, { params });
  },
  // 视频拼接
  concatVideoData: (params = {}) => {
    return request.get(API_CONFIG.ENDPOINTS.VIDEO_DATA_CONCAT, null, { params });
  },
  // 视频上传
  addVideoFileUpload: (data) => {
    console.log('视频数据API参数:', data);
    return request.post(API_CONFIG.ENDPOINTS.VIDEO_FILE_ADD, null, { data });
  },
};

export default videoDataAPI;
